import re
import os
os.getcwd()

f = open('motion0.xml', 'r')

##StartTag: '<' Stuff Attribute '>'
##EndTag: '<' '/' Stuff '>'
##Markup: StartTag Stuff Endtag
##Stuff: {'a'-'z' | 'A'-'Z'}+
##Attribute: Stuff '='{'a'-'z' 0-9 '.'+}
##Stuff: {'a'-'z'| 'A'-'Z' 0-9 '.'} | Markup*
##Content: {'a'-'z'|'A'-'Z', 0-9, '.'}*
##XML: (Markup | Content)*

StartTag = re.compile(r'<\w*(\s\w*\s=\s\w*)?>')
EndTag = re.compile(r'</\w*(\w*)>')
MarkUp = re.compile(r'<\w*\s((\w*)\s=\s\w*)?>\w*</\w*(\w*)>')
Content = re.compile((r'[a-z]|[A-Z]\w*\d*\.'))
print "test"
print StartTag
print EndTag
print MarkUp
print Content
f.close()